import { BrowserRouter, Route, Switch } from 'inula-router';
import { DemoRoutes } from "./demo";

export type CustomRouteProps = {
  auth?: boolean; // 是否需要权限验证
  component: any; // 组件
  animationConfig?: { // 组件切换的动画类
    enter: string;
    exit: string;
  };
}

// 路由配置
const routes = [
  ...DemoRoutes,
];

// 路由组件
export default function RouteComponent() {

  return (
    <BrowserRouter>
      <Switch>
        {
          routes.map((route) => <Route {...route} />)
        }
      </Switch>
    </BrowserRouter>
  );
}
